
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<link rel="stylesheet" href="/static/home/css/ydui.css" />
	<link rel="stylesheet" href="/static/home/css/mydian.css" />
	<script type="text/javascript" src="/static/home/js/vue.js"></script>
	<title>商铺管理</title>
	<style>
	.m-notify{line-height: 1.28rem !important;}
	</style>
</head>
<body style="background-color: #f1f4f8">
	<div class="shop-content-box" id="app" v-cloak>
		<ul v-if="info.length > 0">
		{volist name="shop" id="v" empty="$empty" }
			<li v-for="i in info">
				<div class="shop-mess-box">
					<img src="{$v.avatar}" alt="">
					<div class="rgname-box">
						<div class="rgmess-box">
							<span>{$v.name}的有店</span>
							<span>{$v.tel}</span>
						</div>
						<div class="timer-box">
							<span>{$v.ctime|date=('Y-m-d H:i:s')}</span>
						</div>
					</div>
				</div>
				<div class="form-handle-box">
					<div class="adress-p">
						<p>{$v.address}</p>
					</div>
					<div class="handle-box">
						<div class="hb-box">
							<span class="ydhb" ><a href="{:url('shop/newmyposter')}?code={$v.code}">有店海报</a></span>
							<span class="ydhb" ><a href="{:url('shop/customer')}?code={$v.code}">数据报表</a></span>
						</div>
						<div class="handle-a">
							<a href="{:url('shop/edit')}?id={$v.id}" class="redact">编辑</a>
							<a href="javascript:;" class="remove" onclick='deletetg({$v.id})'>删除</a>
						</div>
					</div>
				</div>
			</li>
			{/volist}
		</ul>
		<div class="flex-shop">
			<a href="{:url('shop/add')}" class="add-btn-shop">添加商铺</a>
		</div>
	</div>
</body>
<script src="/static/home/js/jquery-1.12.4.min.js"></script>
<script src="/static/home/js/ydui.js"></script>
<script>
	function deletetg(id){
		YDUI.dialog.confirm('你确定要删除该商铺吗？', '删除后不可复原！', function() {
			$.post("{:url('del')}",{id:id},function(data){
				if(data.code==1){
					YDUI.dialog.notify(data.msg, 1000, function() {
						location.reload();
					});
				}else{
					YDUI.dialog.notify(data.msg, 1000, function() {
					});
				}
			})
		});
	}
</script>
</html>